package yang.java8.lambda;

import java.util.Arrays;
import java.util.List;

public class ForEachCase {

	public static void main(String[] args) {
		old();
		newF();
	}
	
	public static void old() {
		List<String> features = Arrays.asList("A", "B", "C", "D");
		for (String s : features) {
			System.out.println(s);
		}
	}
	
	public static void newF() {
		List<String> features = Arrays.asList("A", "B", "C", "D");
		features.forEach((String s) -> System.out.println(s));
	}

}
